﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请选择要计算的图形面积1.圆面积、2.正方形面积");
            int Key = int.Parse(Console.ReadLine());
            shape shape;
            switch (Key)
            {
                case 1:
                    Console.WriteLine("请输入圆的半径");
                    int a = int.Parse(Console.ReadLine());
                    shape = new Circle(a);
                    break;
                case 2:
                    Console.WriteLine("请输入正方形的长");
                    int b = int.Parse(Console.ReadLine());
                    shape = new Square(b);
                    break;
                default:
                    shape = new Square(0);
                    break;
            }
            Clculate.Clculatetest(shape);
        }
    }
}
